1. Field of Invention
The invention relates to an embroidery data generating apparatus that generates embroidery data, based on an image colored in subtle gradations of various colors, for forming embroidery that resembles the image very closely. The invention also relates to a computer-readable program memory that stores an embroidery data generating program.
2. Description of Related Art
There are provided, in the field of home-use sewing machines, various embroidery data generating apparatuses that generate embroidery data based on images (such as pictures and patterns). The embroidery data generating apparatuses comprise a personal computer (PC) connecting with an image scanner, a hard disk unit, a keyboard and a CRT display.
In the case of generating the embroidery data by using such conventional embroidery data generating apparatuses, the image scanner first captures an original image and then outputs image data to the PC. The PC extracts, based on the image data, outlines and centerlines that define closed areas from the captured image, and generates the embroidery data for fill stitches or satin stitches in the closed areas defined by the outlines, and/or for running stitches or zigzag chain stitches along the outlines and centerlines.
The conventional embroidery generating apparatus uses the image data only for extracting the outlines and centerlines, as described above. Accordingly, the original image is required to have clear outlines, so that the PC can identify and extract the outlines with high reliability. In other words, an original image colored in subtle gradations of various colors is not recommended for generating the embroidery data, because the PC can not identify the outlines exactly.
However, there have been recently proposed embroidery data generating apparatuses that calculate color changes in subtle color gradations of images, and automatically generate embroidery data by reflecting the calculated color change on thread colors to be used in the embroideries.
For example, Japanese Laid-Open Patent Publications No. 2-221453 and No 11-169568 disclose embroidery data generating apparatuses that can reflect color changes of images on thread color exchange. More specifically, the apparatus captures image data by using an image scanner, and divides the captured image data into a plurality of divided image data by rectangular image areas. These image areas are arranged in matrix form. Then, the apparatus converts the image data into mosaic image data, based on the divided image data, in response to the gradations of the image areas. The apparatus generates the embroidery data for forming cross stitches or satin stitches in the respective image areas, the thread colors corresponding to the gradations of the image areas. That is, the thread colors have to be exchanged in the case where the color gradations change between image areas. The apparatus inserts stop cords into the embroidery data for stopping sewing operations at the positions for exchanging the thread colors.
Japanese Laid-Open Patent Publication No. 11-114260 discloses another embroidery data generating apparatus that can automatically generate embroidery data, with appropriate stitch directions and thread densities for forming embroidery, based on color gradations in the image. The apparatus captures image data by using an image scanner, and divides the captured image data into a plurality of divided image data by rectangular image areas in matrix form. After extracting edges from the image data, the apparatus determines a stitch direction for each image area based on the extracted edge in the image area and, at the same time, determines thread density for each image area based on pixel density in the image area. Then, the apparatus develops stitches for respective image areas based on the determined stitch directions and the thread densities, and generates the embroidery data by connecting the developed stitches.
Incidentally, it is necessary to resolve issues of xe2x80x9cresolutionxe2x80x9d and xe2x80x9ccolorxe2x80x9d in the case of forming the embroidery based on the image data colored in subtle color gradations.
The embroidery is made up of a plurality of stitches given on a workpiece, and each stitch is given by a needle and a thread. Thus, the stitches can not be formed in pieces smaller than the thickness of needle and the thickness of thread. Especially, the embroidery sewing machine needs to use a needle and thread each having sufficient thickness the needle does not snap and the thread does not break. This poses serious limitations in forming the embroidery at a high resolution. In addition, when the needle drops at the same position many times, the threads can easily get entangled with one another or break, and the needle is apt to snap.
Further, there is a need for a large number of thread colors to reproduce the subtle color gradations in the embroidery. It is not realistic to keep threads of hundreds, or even thousands, of different colors. Even if such a large number of threads are ready, it is also not realistic to exchange such a number of threads. Thus, it is necessary to reproduce the color gradations as close to the real color by using a maximum of twenty different colored threads.
All the above-mentioned embroidery data generating apparatuses divide the captured image into a plurality of rectangular image areas, convert the image data into the mosaic image data in response to the color gradations of the image areas, and generate the embroidery data for providing stitches for respective image areas in thread colors corresponding to the color gradations of the image areas. In other words, the image area has to have a greater width than a minimum stitch length (for example, 2 to 3 mm), and is colored in the thread color determined by compressing the color gradations. Therefore, the conventional embroidery data generating apparatuses do not fully resolve the above-mentioned issues.
The invention has been developed to resolve the above-mentioned and other problems.
According to one aspect of the invention, there is provided a method for generating embroidery data for forming an embroidery based on an image colored in a subtle gradation of various colors. More specifically, there is provided a method for generating embroidery data based on image data that represents an image including a plurality of pixels, comprising generating, based on the image data, a plurality of line segment data including respective angle components, respective length components and respective color components, each of the plurality of line segment data corresponding to one pixel group that includes at least one pixel therein and defining a line segment, the angular component indicating a direction in which the line segment extends, the length component indicating a length of the line segment, and the color component indicating a color of the line segment; and generating the embroidery data based on the plurality of line segment data, the embroidery data providing embroidery stitches along the line segments defined by the plurality of line segment data.
According to another aspect of the invention, there is provided a computer-readable memory medium that stores an embroidery data generating program for generating embroidery data, for the use with an embroidery sewing machine, the embroidery data generating program comprising a program for generating, based on the image data, a plurality of line segment data including respective angle components, respective length components and respective color components, each of the plurality of line segment data corresponding to one pixel group that includes at least one pixel therein and defining a line segment, the angular component indicating a direction in which the line segment extends, the length component indicating a length of the line segment, and the color component indicating a color of the line segment; and a program for generating the embroidery data based on the plurality of line segment data, the embroidery data giving embroidery stitches along the line segments defined by the plurality of line segment data.
According to still another aspect of the invention, there is provided an embroidery data generating apparatus that generates embroidery data, comprising a line segment data generating unit that generates, based on the image data, a plurality of line segment data including respective angle components, respective length components and respective color components, each of the plurality of line segment data corresponding to one pixel group that includes at least one pixel therein and defining a line segment, the angular component indicating a direction in which the line segment extends, the length component indicating a length of the line segment, and the color component indicating a color of the line segment; and an embroidery data generating unit that generates the embroidery data based on the plurality of line segment data, the embroidery data providing embroidery stitches along the line segments defined by the plurality of line segment data.
As described above, the embroidery data is generated based on the plurality of the line segment data in the invention, so that the embroidery stitches are provided along the line segments defined by the line segment data. The line segment data is generated for each pixel group, based on an image feature, including its angle, length and color components. According to the invention, it is possible to form the embroidery that resembles the image very closely, as stitch directions wield a large influence on embroidery sewing quality. Even if the line segments are equal to the minimum stitch length, it becomes possible to form, based on the embroidery data of the invention, an embroidery that resembles the image more closely than ever.
Preferably, the line segment data is generated for each pixel group, based on the angular characteristic and its intensity. Especially, the line segment data is generated, with high priority, for one pixel having a higher angular characteristic intensity than the threshold value. The line segment data is generated for any pixel having a lower angular characteristic intensity than the threshold value only when the any pixel is not located on the previously generated line segments. This allows generation of embroidery data that reflects the image feature as closely as possible, without loss of embroidery sewing quality by unnecessary embroidery stitches.